
from core.basic.skill import 技能
from core.basic.character import Character
from core.basic.skill import 主动技能, 被动技能


class 主动技能(主动技能):

    def 基础等级计算(self):
        if self.基础等级 == 0:
            super().基础等级计算()
            if self.所在等级 not in [50, 85, 100] and self.是否主动 == 1:
                self.基础等级 = min(self.基础等级 + 1, self.等级上限)

    def MP消耗(self, **argv):
        char = argv.get("char", {})
        k = char.get_skill_by_name('重火器精通').MP消耗量比率()
        return super().MP消耗(**argv) * k


class 技能0(主动技能):
    名称 = 'M137格林机枪'
    所在等级 = 5
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 5
    MP = [10, 252]
    无色消耗 = 0
    data0 = [0, 77, 86, 93, 100, 110, 118, 125, 133, 142, 148, 156, 164, 172, 181, 188, 196, 204, 211, 220, 228, 236, 244, 252, 259, 267, 276, 283, 292, 300, 307, 315, 323, 330, 338, 348, 355, 363, 370, 378, 386, 393, 403, 411, 418, 426, 434, 441, 449, 459, 465, 474, 482, 489, 497, 504, 513, 521, 529, 537, 545, 552, 560, 569, 576, 585, 593, 599, 608, 616, 624]
    hit0 = 30
    TP成长 = 0.1
    TP上限 = 7


class 技能1(被动技能):
    名称 = '重火器精通'
    所在等级 = 15
    等级上限 = 20
    基础等级 = 10
    学习间隔 = 3
    关联技能 = ['所有']

    冷却关联技能 = ['所有']
    非冷却关联技能 = ['卫星射线', '毁灭射线', '裂核轨道炮']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1 + 0.02 * self.等级, 5)

    def 物理攻击力倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1 + 0.01 * self.等级, 5)

    def MP消耗量比率(self):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1 - 0.03 * self.等级, 5)

    def CD缩减倍率(self, 武器类型):
        if not 武器类型 == '手炮' or self.等级 == 1:
            return 1.0
        else:
            return 0.9


class 技能2(主动技能):
    名称 = "加农炮"
    所在等级 = 20
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 5
    MP = [30, 280]
    无色消耗 = 0
    data0 = [0, 1738, 1915, 2091, 2269, 2447, 2622, 2799, 2975, 3152, 3329, 3504, 3681, 3857, 4034, 4209, 4387, 4563, 4740, 4916, 5092, 5269, 5446, 5622, 5798, 5974, 6152, 6328, 6505, 6680, 6858, 7034, 7212, 7388, 7564, 7741, 7918, 8094, 8270, 8446, 8624, 8800, 8975, 9152, 9328, 9506, 9682, 9858, 10034, 10211, 10388, 10564, 10740, 10917, 11093, 11271, 11446, 11623, 11799, 11976, 12151, 12330, 12506, 12683, 12859, 13036, 13212, 13389, 13565, 13742, 13918]
    hit0 = 2
    TP成长 = 0.1
    TP上限 = 7


class 技能3(主动技能):
    名称 = "反坦克炮"
    所在等级 = 20
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 6
    MP = [40, 391]
    无色消耗 = 0
    data0 = [0, 805, 887, 967, 1050, 1132, 1214, 1294, 1376, 1458, 1540, 1622, 1704, 1785, 1867, 1949, 2030, 2112, 2193, 2275, 2357, 2439, 2521, 2602, 2684, 2766, 2849, 2929, 3010, 3092, 3173, 3256, 3338, 3419, 3500, 3583, 3665, 3746, 3826, 3909, 3991, 4073, 4155, 4236, 4318, 4400, 4482, 4563, 4644, 4726, 4808, 4890, 4972, 5053, 5135, 5217, 5299, 5382, 5461, 5543, 5625, 5706, 5789, 5870, 5952, 6034, 6116, 6197, 6278, 6360, 6442]
    hit0 = 1
    data1 = [0, 3220, 3548, 3874, 4201, 4527, 4854, 5182, 5508, 5835, 6162, 6488, 6816, 7142, 7469, 7796, 8122, 8451, 8777, 9104, 9431, 9758, 10085, 10411, 10738, 11065, 11392, 11719, 12044, 12371, 12698, 13024, 13352, 13678, 14005, 14332, 14658, 14986, 15312, 15639, 15966, 16292, 16620, 16948, 17274, 17601, 17927, 18255, 18582, 18908, 19235, 19561, 19889, 20216, 20542, 20869, 21196, 21523, 21850, 22176, 22502, 22828, 23156, 23483, 23809, 24136, 24462, 24790, 25117, 25443, 25770]
    hit1 = 1
    TP成长 = 0.1
    TP上限 = 7


class 技能4(被动技能):
    名称 = '超动力补给包'
    所在等级 = 25
    等级上限 = 11
    基础等级 = 1
    学习间隔 = 3

    关联技能 = ['所有']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.09 + 0.01 * self.等级, 5)


class 技能5(主动技能):
    名称 = "激光炮"
    所在等级 = 25
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 7
    MP = [61, 512]
    无色消耗 = 0
    data0 = [0, 4260, 4692, 5124, 5556, 5988, 6420, 6854, 7285, 7717, 8151, 8581, 9014, 9446, 9878, 10311, 10742, 11176, 11607, 12038, 12472, 12904, 13336, 13768, 14201, 14632, 15064, 15497, 15929, 16361, 16795, 17226, 17657, 18089, 18522, 18955, 19386, 19819, 20252, 20682, 21116, 21548, 21979, 22413, 22845, 23277, 23709, 24140, 24573, 25005, 25439, 25870, 26301, 26734, 27166, 27599, 28031, 28463, 28896, 29326, 29759, 30192, 30623, 31057, 31489, 31920, 32354, 32784, 33217, 33650, 34081]
    hit0 = 1
    TP成长 = 0.1
    TP上限 = 7


class 技能6(被动技能):
    名称 = '蓄电激光炮'
    所在等级 = 25
    等级上限 = 11
    基础等级 = 1
    学习间隔 = 2
    关联技能 = ['激光炮']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.45 + 0.05 * self.等级, 5)


class 技能7(主动技能):
    名称 = "聚焦喷火器"
    所在等级 = 30
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 12
    MP = [130, 980]
    无色消耗 = 0
    data0 = [0, 381, 420, 459, 498, 536, 576, 613, 651, 691, 729, 768, 807, 846, 884, 924, 961, 1000, 1039, 1078, 1116, 1155, 1194, 1232, 1272, 1309, 1348, 1387, 1426, 1464, 1504, 1542, 1581, 1620, 1657, 1696, 1735, 1775, 1812, 1853, 1891, 1930, 1968, 2007, 2045, 2085, 2123, 2162, 2201, 2240, 2278, 2316, 2355, 2393, 2433, 2471, 2510, 2549, 2588, 2626, 2665, 2703, 2742, 2781, 2820, 2858, 2897, 2936, 2974, 3013, 3051]
    hit0 = 29
    TP成长 = 0.1
    TP上限 = 7


class 技能8(主动技能):
    名称 = 'FM31榴弹发射器'
    所在等级 = 35
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 15
    MP = [50, 630]
    无色消耗 = 0
    data0 = [0, 4028, 4435, 4845, 5252, 5662, 6069, 6479, 6889, 7296, 7705, 8112, 8522, 8930, 9339, 9748, 10156, 10566, 10973, 11381, 11791, 12199, 12607, 13016, 13426, 13833, 14243, 14651, 15060, 15467, 15876, 16286, 16694, 17103, 17510, 17920, 18327, 18737, 19147, 19554, 19964, 20371, 20781, 21189, 21597, 22006, 22415, 22824, 23231, 23640, 24049, 24458, 24866, 25276, 25684, 26091, 26501, 26910, 27318, 27728, 28135, 28545, 28952, 29361, 29768, 30178, 30588, 30995, 31405, 31812, 32222]
    hit0 = 3
    TP成长 = 0.10
    TP上限 = 5

    是否有护石 = 1

    def 装备护石(self, char):
        self.倍率 *= 0.64 * 2


class 技能9(主动技能):
    名称 = 'FM92刺弹炮'
    所在等级 = 35
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 20
    MP = [164, 1376]
    无色消耗 = 1
    data0 = [0, 3034, 3342, 3650, 3959, 4267, 4575, 4883, 5190, 5498, 5805, 6114, 6422, 6730, 7037, 7345, 7653, 7962, 8270, 8578, 8886, 9192, 9500, 9808, 10117, 10425, 10733, 11041, 11348, 11656, 11965, 12273, 12581, 12888, 13195, 13504, 13813, 14121, 14429, 14737, 15045, 15353, 15660, 15969, 16277, 16585, 16892, 17200, 17507, 17816, 18124, 18432, 18740, 19048, 19356, 19664, 19972, 20279, 20587, 20895, 21203, 21510, 21819, 22127, 22435, 22743, 23051, 23359, 23665, 23974, 24282]
    hit0 = 5
    TP成长 = 0.1
    TP上限 = 5


class 技能10(主动技能):
    名称 = "量子爆弹"
    所在等级 = 40
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 18
    MP = [164, 1376]
    无色消耗 = 1
    data0 = [0, 3745, 4123, 4505, 4883, 5264, 5643, 6024, 6402, 6784, 7163, 7544, 7924, 8302, 8684, 9062, 9444, 9822, 10203, 10583, 10963, 11342, 11723, 12102, 12483, 12862, 13240, 13622, 14003, 14382, 14762, 15141, 15522, 15901, 16281, 16661, 17041, 17422, 17801, 18181, 18561, 18941, 19320, 19701, 20080, 20461, 20841, 21219, 21601, 21979, 22361, 22739, 23120, 23499, 23880, 24258, 24640, 25019, 25400, 25779, 26158, 26539, 26918, 27298, 27679, 28058, 28439, 28818, 29198, 29578, 29958]
    hit0 = 1
    data1 = [0, 11859, 13061, 14264, 15468, 16671, 17874, 19077, 20280, 21483, 22684, 23888, 25090, 26294, 27497, 28701, 29904, 31106, 32310, 33512, 34716, 35918, 37122, 38324, 39527, 40732, 41934, 43138, 44340, 45544, 46746, 47949, 49152, 50355, 51558, 52762, 53964, 55168, 56371, 57574, 58777, 59980, 61183, 62385, 63589, 64791, 65996, 67198, 68402, 69605, 70807, 72011, 73213, 74417, 75619, 76824, 78026, 79229, 80432, 81635, 82838, 84041, 85245, 86447, 87650, 88853, 90057, 91260, 92463, 93664, 94869]
    hit1 = 1
    感电data0 = [0, 12, 12, 13, 15, 15, 16, 17, 18, 19, 21, 22, 23, 24, 24, 25, 27, 28, 29, 30, 32, 33, 34, 35, 35, 36, 38, 39, 40, 41, 42, 44, 45, 45, 46, 47, 49, 50, 51, 52, 53, 55, 56, 56, 57, 58, 59, 61, 62, 63, 64, 66, 66, 67, 68, 69, 70, 72, 73, 74, 75, 76, 76, 78, 79, 80, 81, 83, 84, 85, 86]
    感电hit0 = 1
    CD = 18.0
    TP成长 = 0.10
    TP上限 = 5

    是否有护石 = 1

    def 装备护石(self, char):
        self.hit0 = 0
        self.power1 = 0.20 * 9
        self.感电power0 = 0.20 * 9


class 技能11(主动技能):
    名称 = "X1压缩量子炮"
    所在等级 = 45
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 45
    MP = [350, 2940]
    无色消耗 = 2
    data0 = [0, 34796, 38326, 41857, 45387, 48918, 52447, 55977, 59507, 63037, 66568, 70098, 73628, 77158, 80689, 84219, 87749, 91280, 94809, 98340, 101870, 105400, 108930, 112460, 115990, 119520, 123051, 126581, 130112, 133641, 137170, 140701, 144231, 147762, 151292, 154823, 158351, 161881, 165412, 168942, 172474, 176004, 179531, 183063, 186593, 190124, 193654, 197185, 200714, 204245, 207774, 211304, 214835, 218365, 221895, 225425, 228956, 232485, 236015, 239546, 243075, 246606, 250136, 253667, 257196, 260726, 264256, 267786, 271318, 274848, 278379]
    hit0 = 1
    TP成长 = 0.1
    TP上限 = 5

    是否有护石 = 1

    def 装备护石(self, char):
        self.倍率 *= 1.2768


class 技能12(被动技能):
    名称 = '卫星定位'
    所在等级 = 48
    等级上限 = 50
    学习间隔 = 3
    等级精通 = 40

    关联技能 = ['所有']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.075 + 0.015 * self.等级, 5)


class 技能13(主动技能):
    名称 = "卫星射线"
    所在等级 = 50
    等级上限 = 50
    学习间隔 = 5
    等级精通 = 40
    CD = 145
    MP = [881, 5288]
    无色消耗 = 5
    data0 = [0, 5563, 6852, 8143, 9433, 10723, 12013, 13302, 14594, 15883, 17173, 18464, 19753, 21043, 22333, 23624, 24913, 26203, 27493, 28784, 30074, 31363, 32654, 33944, 35233, 36524, 37814, 39105, 40394, 41683, 42975, 44264, 45554, 46845, 48134, 49425, 50714, 52005, 53295, 54584, 55874, 57165, 58455, 59744, 61035, 62325, 63615, 64905, 66195, 67485, 68775]
    hit0 = 1
    data1 = [0, 2075, 2556, 3037, 3519, 4000, 4481, 4961, 5443, 5924, 6405, 6887, 7368, 7848, 8330, 8811, 9292, 9774, 10256, 10736, 11218, 11699, 12180, 12662, 13143, 13623, 14105, 14586, 15067, 15549, 16030, 16510, 16992, 17473, 17954, 18436, 18917, 19397, 19878, 20361, 20842, 21324, 21805, 22285, 22767, 23248, 23729, 24211, 24692, 25172, 25653]
    hit1 = 42

    def 等效百分比(self, **argv):
        return super().等效百分比(**argv) * (1.1 if self.等级 >= 9 else 1)


class 技能14(主动技能):
    名称 = "等离子放射器"
    所在等级 = 60
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 30
    MP = [400, 1120]
    无色消耗 = 1
    data0 = [0, 2375, 2616, 2857, 3097, 3338, 3580, 3820, 4062, 4303, 4544, 4785, 5025, 5267, 5507, 5748, 5989, 6231, 6471, 6712, 6954, 7194, 7436, 7677, 7918, 8159, 8398, 8640, 8881, 9122, 9363, 9605, 9845, 10086, 10328, 10568, 10810, 11050, 11290, 11532, 11773, 12014, 12255, 12497, 12737, 12979, 13220, 13460, 13701, 13941, 14183]
    hit0 = 12
    TP成长 = 0.1
    TP上限 = 5

    是否有护石 = 1

    def 装备护石(self, char):
        self.倍率 *= 1.25
        self.CDR *= 0.88


class 技能15(主动技能):
    名称 = 'FM92SW刺弹炮'
    所在等级 = 70
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 50
    MP = [800, 1680]
    无色消耗 = 2
    data0 = [0, 9899, 10904, 11909, 12913, 13918, 14923, 15928, 16930, 17935, 18940, 19943, 20948, 21954, 22959, 23961, 24966, 25971, 26975, 27979, 28984, 29990, 30993, 31997, 33002, 34006, 35010, 36015, 37021, 38024, 39028, 40033, 41037, 42042, 43046, 44049, 45055, 46059, 47064, 48068, 49073, 50077, 51080, 52085, 53091, 54095, 55099, 56104, 57109, 58111, 59116]
    hit0 = 4
    data1 = [0, 1159, 1276, 1395, 1513, 1628, 1746, 1865, 1982, 2100, 2218, 2335, 2453, 2572, 2689, 2806, 2923, 3041, 3159, 3275, 3393, 3512, 3629, 3747, 3864, 3982, 4100, 4218, 4335, 4452, 4570, 4687, 4806, 4924, 5040, 5158, 5277, 5394, 5512, 5630, 5746, 5864, 5982, 6099, 6217, 6335, 6452, 6571, 6688, 6805, 6924]
    hit1 = 12
    # 灼伤攻击力,在点TP之后删除
    灼伤data0 = [0, 28, 31, 34, 36, 39, 42, 45, 48, 51, 54, 56, 59, 62, 65, 67, 71, 74, 76, 79, 82, 85, 87, 90, 94, 96, 99, 102, 105, 107, 110, 113, 116, 119, 122, 125, 127, 130, 133, 135, 138, 142, 145, 147, 150, 153, 155, 158, 161, 165, 167]
    # 灼伤8次
    灼伤hit0 = 8
    TP成长 = 0.1
    TP上限 = 5

    是否有护石 = 1

    def 装备护石(self, char):
        # self.hit0 = 6
        # self.power0 = 1.06
        # self.倍率 *= 0.57
        self.CD = 25
        self.基础施放次数 = 2
        self.灼伤power0 = 0
        self.倍率 *= 0.57 + 0.06*6/4

    def 比等效百分比(self, **argv):
        if self.TP等级 > 0:
            self.灼伤hit0 = 0
        else:
            self.灼伤hit0 = 8
        return super().等效百分比(**argv)


class 技能16(被动技能):
    名称 = '重火器改良'
    所在等级 = 75
    等级上限 = 50
    学习间隔 = 3
    等级精通 = 40

    关联技能 = ['所有']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.23 + 0.02 * self.等级, 5)


class 技能17(主动技能):
    名称 = "地脉震荡器"
    所在等级 = 75
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 40
    MP = [580, 4500]
    无色消耗 = 3
    data0 = [0, 3095, 3410, 3724, 4038, 4352, 4666, 4980, 5296, 5608, 5922, 6236, 6550, 6864, 7178, 7492, 7807, 8121, 8435, 8749, 9063, 9377, 9692, 10005, 10319, 10633, 10947, 11261, 11576, 11890, 12204, 12519, 12832, 13146, 13460, 13775, 14089, 14403, 14716, 15031, 15344, 15658, 15973, 16287, 16601, 16915, 17228, 17543, 17858, 18172, 18486]
    hit0 = 1
    data1 = [0, 10834, 11935, 13033, 14133, 15232, 16332, 17431, 18530, 19630, 20729, 21828, 22927, 24027, 25127, 26226, 27326, 28425, 29524, 30623, 31723, 32822, 33921, 35019, 36119, 37218, 38317, 39418, 40516, 41616, 42714, 43815, 44913, 46013, 47112, 48212, 49311, 50410, 51511, 52609, 53709, 54808, 55908, 57006, 58106, 59204, 60304, 61402, 62503, 63601, 64701]
    hit1 = 1
    data2 = [0, 2322, 2557, 2794, 3027, 3263, 3500, 3734, 3971, 4207, 4440, 4677, 4912, 5149, 5384, 5619, 5856, 6089, 6326, 6562, 6797, 7033, 7268, 7504, 7739, 7974, 8211, 8446, 8682, 8918, 9152, 9388, 9624, 9860, 10095, 10330, 10567, 10801, 11037, 11273, 11508, 11744, 11980, 12215, 12450, 12686, 12922, 13158, 13393, 13629, 13864]
    hit2 = 1
    data3 = [0, 5417, 5967, 6517, 7066, 7616, 8166, 8716, 9265, 9814, 10365, 10915, 11463, 12013, 12564, 13113, 13663, 14212, 14762, 15312, 15861, 16411, 16961, 17509, 18059, 18608, 19158, 19708, 20257, 20807, 21357, 21906, 22457, 23006, 23555, 24105, 24656, 25205, 25754, 26303, 26854, 27404, 27952, 28503, 29053, 29602, 30151, 30702, 31251, 31801, 32349]
    hit3 = 6
    data4 = [0, 28637, 31543, 34448, 37353, 40259, 43165, 46068, 48974, 51880, 54785, 57690, 60596, 63501, 66406, 69312, 72216, 75122, 78027, 80933, 83838, 86744, 89649, 92554, 95460, 98363, 101270, 104175, 107080, 109986, 112892, 115796, 118702, 121608, 124511, 127417, 130323, 133229, 136133, 139039, 141945, 144850, 147755, 150659, 153565, 156470, 159377, 162281, 165187, 168092, 170998]
    hit4 = 1

    是否有护石 = 1

    def 装备护石(self, char):
        self.hit0 = 0
        self.hit1 = 0
        self.hit2 = 0
        self.hit3 = 1
        self.power3 = 11
        self.power4 = 1.52
        # self.倍率 *= 1.3324


class 技能18(主动技能):
    名称 = "MSC7"
    所在等级 = 80
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 45
    MP = [824, 6180]
    无色消耗 = 5
    data0 = [0, 8214, 9047, 9879, 10713, 11547, 12380, 13214, 14047, 14880, 15713, 16547, 17380, 18213, 19045, 19879, 20713, 21547, 22380, 23213, 24046, 24879, 25712, 26546, 27379, 28214, 29046, 29879, 30714, 31546, 32379, 33213, 34045, 34878, 35714, 36546, 37379, 38213, 39045, 39879, 40712, 41545, 42380, 43213, 44045, 44879, 45713, 46545, 47379, 48212, 49046]
    hit0 = 1
    data1 = [0, 73927, 81426, 88926, 96425, 103926, 111425, 118925, 126424, 133925, 141424, 148924, 156422, 163923, 171422, 178922, 186421, 193922, 201421, 208922, 216422, 223922, 231421, 238921, 246421, 253921, 261420, 268920, 276420, 283920, 291419, 298919, 306420, 313919, 321419, 328919, 336418, 343917, 351417, 358916, 366418, 373917, 381417, 388916, 396417, 403916, 411416, 418916, 426416, 433915, 441415]
    hit1 = 1

    是否有护石 = 1

    def 装备护石(self, char):
        self.CDR *= 0.88
        self.power0 = 0
        self.power1 = 1+0.27+0.21


class 技能19(主动技能):
    名称 = "毁灭射线"
    所在等级 = 85
    等级上限 = 50
    学习间隔 = 5
    等级精通 = 40
    CD = 180
    MP = [2500, 8000]
    无色消耗 = 10
    data0 = [0, 8593, 10585, 12579, 14571, 16564, 18556, 20548, 22541, 24533, 26527, 28519, 30512, 32504, 34497, 36489, 38482, 40476, 42469, 44461, 46453, 48446, 50438, 52432, 54424, 56417, 58409, 60402, 62394, 64386, 66380, 68372, 70365, 72357, 74350, 76342, 78335, 80328, 82320, 84314, 86306, 88299, 90291, 92285, 94277, 96270, 98262, 100255, 102247, 104240, 106233]
    hit0 = 10
    data1 = [0, 128898, 158788, 188679, 218569, 248458, 278347, 308238, 338127, 368017, 397907, 427796, 457686, 487576, 517466, 547356, 577245, 607135, 637024, 666915, 696805, 726693, 756583, 786474, 816363, 846253, 876142, 906033, 935922, 965812, 995702, 1025591, 1055481, 1085371, 1115260, 1145151, 1175040, 1204930, 1234819, 1264710, 1294600, 1324488, 1354378, 1384269, 1414158, 1444047, 1473937, 1503828, 1533717, 1563607, 1593497]
    hit1 = 1


class 技能20(被动技能):
    名称 = '连锁卫星'
    所在等级 = 95
    等级上限 = 50
    学习间隔 = 3
    等级精通 = 40

    关联技能 = ['所有']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.18 + 0.02 * self.等级, 5)


class 技能21(主动技能):
    名称 = 'MLDRS95发射器'
    所在等级 = 95
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 60
    MP = [773, 6000]
    无色消耗 = 7
    data0 = [0, 2718, 2993, 3268, 3545, 3820, 4096, 4372, 4648, 4924, 5199, 5474, 5750, 6026, 6303, 6578, 6853, 7130, 7405, 7680, 7958, 8233, 8509, 8784, 9059, 9336, 9611, 9887, 10163, 10439, 10715, 10990, 11264, 11542, 11818, 12093, 12368, 12644, 12920, 13195, 13471, 13748, 14023, 14298, 14574, 14850, 15126, 15402, 15677, 15954, 16229]
    hit0 = 15
    data1 = [0, 122312, 134721, 147129, 159538, 171948, 184357, 196765, 209174, 221583, 233991, 246399, 258808, 271217, 283625, 296034, 308443, 320852, 333260, 345669, 358078, 370485, 382894, 395304, 407713, 420120, 432529, 444938, 457347, 469755, 482163, 494572, 506980, 519389, 531798, 544207, 556615, 569024, 581434, 593843, 606250, 618659, 631068, 643476, 655885, 668294, 680703, 693111, 705520, 717929, 730337]
    hit1 = 1


class 技能22(主动技能):
    名称 = "裂核轨道炮"
    所在等级 = 100
    等级上限 = 50
    学习间隔 = 5
    等级精通 = 40
    CD = 290
    MP = [4027, 8054]
    无色消耗 = 15
    data0 = [0, 11829, 14572, 17315, 20057, 22802, 25544, 28288, 31030, 33773, 36516, 39260, 42002, 44746, 47487, 50232, 52973, 55717, 58460, 61203, 63945, 66689, 69432, 72175, 74919, 77661, 80405, 83147, 85891, 88634, 91377, 94119, 96863, 99605, 102350, 105092, 107835, 110578, 113321, 116063, 118808, 121550, 124293, 127036, 129779, 132524, 135266, 138009, 140752, 143495, 146236]
    hit0 = 5
    data1 = [0, 236586, 291446, 346308, 401168, 456029, 510890, 565749, 620611, 675470, 730333, 785192, 840055, 894914, 949775, 1004637, 1059496, 1114356, 1169218, 1224079, 1278939, 1333801, 1388660, 1443521, 1498382, 1553243, 1608103, 1662964, 1717825, 1772685, 1827547, 1882407, 1937266, 1992129, 2046988, 2101850, 2156710, 2211571, 2266431, 2321293, 2376153, 2431013, 2485874, 2540735, 2595595, 2650457, 2705317, 2760177, 2815038, 2869899, 2924759]
    hit1 = 1
    data2 = [0, 29574, 36430, 43287, 50146, 57002, 63861, 70718, 77576, 84434, 91290, 98149, 105006, 111865, 118722, 125578, 132437, 139293, 146152, 153009, 159866, 166724, 173581, 180440, 187297, 194154, 201012, 207870, 214728, 221585, 228444, 235300, 242158, 249016, 255874, 262731, 269587, 276445, 283303, 290161, 297019, 303875, 310734, 317591, 324449, 331307, 338164, 345022, 351880, 358738, 365594]
    hit2 = 10


class classChange(Character):
    def __init__(self, equVersion=""):
        self.实际名称 = 'launcher_male'
        self.名称 = '重霄·枪炮师'
        self.角色 = '神枪手(男)'

        self.职业 = '枪炮师'
        # 用来筛CP武器的
        self.转职 = '枪炮师(男)'
        self.武器选项 = ['手炮']
        self.输出类型选项 = ['物理百分比']
        self.防具精通属性 = ['力量']
        self.类型 = '物理百分比'
        self.武器类型 = '手炮'
        self.防具类型 = '重甲'
        技能列表 = []
        技能序号 = {}
        i = 0
        while i >= 0:
            try:
                tem = eval('技能'+str(i)+'()')
                tem.基础等级计算()
                技能序号[tem.名称] = i
                技能列表.append(tem)
                i += 1
            except:
                i = -1
        self.技能栏 = 技能列表
        self.技能序号 = 技能序号
        self.buff = 1.957

        super().__init__(equVersion)

    # def 职业特殊计算(self):
    #     k = self.get_skill_by_name('重火器精通').MP消耗量比率()
    #     for i in self.技能栏:
    #         if i.是否主动 == 1:
    #             i.MP = [int(i.MP[0] * k), int(i.MP[1] * k)]

    def 火属性强化(self) -> float:
        max_num = max([super().火属性强化(), super().光属性强化()])
        return max_num

    def 光属性强化(self) -> float:
        max_num = max([super().火属性强化(), super().光属性强化()])
        return max_num
